<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ include file='../share_header.jsp' %>
<script>
    $(function () {
        $("#customerForm").validate({
            errorElement: 'div',
            errorClass: 'help-inline',
            focusInvalid: false,
            rules: {
                customerName: {
                    required: true
                },
                responsiblePerson: {
                    required: true
                },
                contact: {
                    required: true
                },
                phoneNumber: {
                    required: true
                }
            },
            messages: {
                customerName: {
                    required: "客户名称不能为空！"
                },
                responsiblePerson: {
                    required: "责任人不能为空！"
                },
                contact: {
                    required: "联系人不能为空！"
                },
                phoneNumber: {
                    required: "手机号不能为空！"
                }
            },
            highlight: function (element) {
                $(element).closest('.control-group').addClass('error');
            },
            success: function (label) {
                label.closest('.control-group').removeClass('error');
                label.remove();
            },
            errorPlacement: function (error, element) {
                element.parent('.controls').append(error);
            }
        });
    });
</script>
<form id="customerForm" class="form-horizontal" style="display:block;margin-left: 140px; margin-top: 10px"
      action="javascript:return 0;">
    <fieldset>
        <div style="display:block;float:left">
            <div class="control-group">

                <label class="control-label"><span class="importantColor">*&nbsp;</span>客户名称</label>

                <div class="controls">
                    <input type="text" placeholder="" class="" name="customerName" id="customerName">

                    <p class="help-block"></p>
                </div>
            </div>
            <div class="control-group">

                <label class="control-label"><span class="importantColor">*&nbsp;</span>责任人</label>

                <div class="controls">
                    <input type="text" placeholder="" class="" id="responsiblePerson" name="responsiblePerson">

                    <p class="help-block"></p>
                </div>
            </div>
            <div class="control-group">

                <label class="control-label"><span class="importantColor">*&nbsp;</span>联系人</label>

                <div class="controls">
                    <input type="text" placeholder="" class="" id="contact" name="contact">

                    <p class="help-block"></p>
                </div>
            </div>

            <div class="control-group">

                <label class="control-label">座机号码</label>

                <div class="controls">
                    <input type="text" placeholder="" class="" id="landlinePhoneNumber" name="landlinePhoneNumber">

                    <p class="help-block"></p>
                </div>
            </div>
            <div class="control-group">

                <label class="control-label">传真</label>

                <div class="controls">
                    <input type="text" placeholder="" class="" id="fax" name="fax">

                    <p class="help-block"></p>
                </div>
            </div>

            <div class="control-group">

                <label class="control-label">地址</label>

                <div class="controls">
                    <input type="text" placeholder="" class="" id="address" name="address">

                    <p class="help-block"></p>
                </div>
            </div>
            <div class="control-group">

                <label class="control-label">所属行业</label>

                <div class="controls">
                    <select class="selectWidthSameText" id="industry" name="industry">
                        <option>钢铁</option>
                    </select>
                </div>

            </div>
            <div class="control-group">

                <label class="control-label">所属区域</label>

                <div class="controls">
                    <select class="selectWidthSameText" id="area" name="area">
                        <option>省</option>
                    </select>
                </div>

            </div>
            <div class="control-group">

                <label class="control-label">企业类型</label>

                <div class="controls">
                    <select class="selectWidthSameText" id="firmType" name="firmType">
                        <option>外商投资企业</option>
                    </select>
                </div>

            </div>


        </div>
        <div style="display:block;float:left">
            <div class="control-group">

                <label class="control-label">客户ID</label>

                <div class="controls">
                    <input type="text" placeholder="" class="" id="customerId" name="customerId">

                    <p class="help-block"></p>
                </div>
            </div>
            <div class="control-group">

                <label class="control-label">来源</label>

                <div class="controls">
                    <select class="selectWidthSameText" id="source" , name="source">
                        <option>网站注册</option>
                    </select>
                </div>

            </div>
            <div class="control-group">

                <label class="control-label">身份证号</label>

                <div class="controls">
                    <input type="text" placeholder="" class="" id="idNumber" name="idNumber">

                    <p class="help-block"></p>
                </div>
            </div>
            <div class="control-group">

                <label class="control-label"><span class="importantColor">*&nbsp;</span>手机号</label>

                <div class="controls">
                    <input type="text" placeholder="" class="" id="phoneNumber" name="phoneNumber">

                    <p class="help-block"></p>
                </div>
            </div>
            <div class="control-group">

                <label class="control-label">座机</label>

                <div class="controls">
                    <input type="text" placeholder="" class="">

                    <p class="help-block"></p>
                </div>
            </div>
            <div class="control-group">

                <label class="control-label">邮编</label>

                <div class="controls">
                    <input type="text" placeholder="" class="" id="postCode" name="postCode">

                    <p class="help-block"></p>
                </div>
            </div>
            <div class="control-group">

                <label class="control-label">客户类型</label>

                <div class="controls">
                    <select class="selectWidthSameText" id="customerType" name="customerType">
                        <option>生产企业</option>
                        <option>个人</option>
                    </select>
                </div>
            </div>
            <div class="control-group">

                <label class="control-label">客户等级</label>

                <div class="controls">
                    <select class="selectWidthSameText" id="customerGrade" name="customerGrade">
                        <option>潜在客户</option>
                    </select>
                </div>

            </div>
        </div>